package com.afeng.web.module.common.controller;

import com.afeng.web.framework.core.BaseApiController;
import com.afeng.web.framework.core.constant.ApiResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * swagger 接口
 *
 * @author ruoyi
 */
@Validated
@RequestMapping("/")
@Controller
public class HomeController extends BaseApiController {

    @ApiOperation("处理跨域，主要是swagger会默认调用这接口")
    @GetMapping("/csrf")
    @ResponseBody
    public ApiResult csrf() {
        return success();
    }

}
